subroutine getGradu()
use mod_2dflu
implicit none
integer :: i1,i2,k1,k2,ireal,iimag,ksqr
double precision :: rk2,kx,ky,psi_real,psi_imag
!!
!! Find out GradU matrix as an array in Fourier Space.
!!
factor = 2.0d0*pi/length
do i2 = 1,n2
  k2 = (i2-1) - n2*(i2/(n1hf+1))	
  do i1 =1,n1hf
    k1 = i1 -1
    ksqr = k1*k1 + k2*k2 
    rk2 = factor*factor*dfloat(ksqr)
    ireal = 2*i1 -1
    iimag = 2*i1
    kx = factor*dfloat(k1)
    ky = factor*dfloat(k2)
    if((ksqr.gt.kasqr).or.(ksqr.eq.0))then
      dx_ux(ireal,i2) = 0.0d0; dx_ux(iimag,i2) = 0.0d0
      dy_ux(ireal,i2) = 0.0d0; dy_ux(iimag,i2) = 0.0d0
      dx_uy(ireal,i2) = 0.0d0; dx_uy(iimag,i2) = 0.0d0
    else
      psi_real = -omega(ireal,i2)/rk2
      psi_imag = -omega(iimag,i2)/rk2
      dx_ux(ireal,i2) = kx*ky*psi_real; dx_ux(iimag,i2) = kx*ky*psi_imag
      dy_ux(ireal,i2) = ky*ky*psi_real; dy_ux(iimag,i2) = ky*ky*psi_imag
      dx_uy(ireal,i2) = -kx*kx*psi_real; dx_uy(iimag,i2) = -kx*kx*psi_imag
    endif
  enddo
enddo
!!
!! --------------------- 
!!
end subroutine getGradu
